var express = require('express');
var router = express.Router();
var wechat = require('wechat');
var config = require('../config');

router.use('/checkSignature',function(req,res){
    wechat.checkSignature(req.query,config.token)
})

router.use('/',wechat(config,function (req,res,next) {
    var message = req.weixin;
    console.log(message);
    res.reply('hehe')
}))



module.exports = router